package com.softwareengineering.trafficapplicationv2;

/**
 * This file is part of the Traffic Simulation Application.
 * The Traffic Simulation Application is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * The Traffic Simulation Application is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * You should have received a copy of the GNU General Public License
 * along with the Traffic Simulation Application.  If not, see <http://www.gnu.org/licenses/>.
 * 
 * @file Moveable.java
 * @author (c) Martin Treiber, http://traffic-simulation.de/
 * @alterations David Black, Chris Nelson, and Garrett Stibbs, (c) December 03, 2012
 * @description Moveable represents a general vehicle object with position,
 * 				velocity eyc. In each time step, the objects are updated by
 * 				moving them forward (method translate), by changing the velocity
 * 				(method accelerate), and, in time steps where timeToChange return
 * 				true, by possibly changing the lane (method change)
 * 				Implementations of this interface include
 * 					Car: all "normal" cars and trucks
 * 					Obstacle: These are implemented by immobile vehicles
 * 					BCCar: These are introduced for bookkeeping purposes, only to
 * 					make sure that any Car has a predecessor required for calculating
 * 					the acceleration.
 * 
 */
 
public interface Moveable {
    public void accelerate(double dt, Moveable vwd);
    
    public double acceleration(Moveable vwd);
    
    public boolean change(Moveable fOld, Moveable fNew, Moveable bNew);
    
    public int color();
    
    public double dAcc(Moveable vwd, Moveable bwd);
    
    public int lane();
    
    public double length();
    
    public MicroModel model();
    
    public int NR();
    
    public double position();
    
    public double realLane();
    
    public void setColor(int color);
    
    public void setLane(int lane);
    
    public void setLaneChange(LaneChange lanechange);
    
    public void setLaneLast(int lane);
    
    public void setLength(double length);

    public void setModel(MicroModel model);
    
    public void setPosition(double x);
    
    public void setVelocity(double v);
    
    public boolean timeToChange(double dt);
    
    public void translate(double dt);
    
    public double velocity();
}
